package com.hghivln.erpwarehouse.system.utils;

import org.apache.shiro.crypto.hash.Md5Hash;

import java.util.HashMap;
import java.util.UUID;

public class MD5Utils {

    // 生成uuid
    public static String createUUID() {
        return UUID.randomUUID().toString().replace("-","");
    }

    // 对密码加密
    public static String md5(String source,String salt,Integer hashIterations){
        Md5Hash md5Hash = new Md5Hash(source, salt, hashIterations);
        return md5Hash.toString();
    }
}
